<!-- 内容标题（页面标题） -->
<div class="content-header">
    <div class="container-fluid">
        <div class="col-sm float-sm-right">
            <ol class="breadcrumb float-sm-right">
                <li class="breadcrumb-item"><a href="javascript:void(0)" onclick="loadSubPage('mydisk')">网盘</a></li>
                <li class="breadcrumb-item active">我的网盘</li>
            </ol>
        </div>
        <div class="row mb-2" id="fileTabBts">
            <div class="col-sm-1">
                <button type="button" class="btn btn-primary btn-block"><i class="fa fa-upload"></i> 上传</button>
            </div><!-- /.col -->
            <div class="col-sm-1">
                <button type="button" class="btn btn-primary btn-block" onclick="fileOpBtClickById('mkdir',0)"><i class="fa fa-plus"></i> 新建</button>
            </div><!-- /.col -->
            <div class="col-sm-1">
                <button type="button" class="btn btn-secondary btn-block" ><i class="fa fa-download"></i> 离线下载</button>
            </div><!-- /.col -->
            <div class="col-sm-1" v-if="clipboardUsed"><button type="button" class="btn btn-primary btn-block" onclick="fileOpBtClick('paste')" ><i class="fa fa-paste"></i> 粘贴</button></div>

            <div v-if="selectedCnt>0" class="col-sm-auto"><button type="button" class="btn btn-primary btn-sm" onclick="fileOpBtClick('share')"><i class="fa fa-share-alt"></i> 共享</button></div>
            <div v-if="selectedCnt>0" class="col-sm-auto"><button type="button" class="btn btn-success btn-sm" onclick="fileOpBtClick('download')"><i class="fa fa-download"></i> 下载</button></div>
            <div v-if="selectedCnt>0" class="col-sm-auto"><button type="button" class="btn btn-primary btn-sm" onclick="fileOpBtClick('copy')"><i class="fa fa-copy"></i> 复制</button></div>
            <div v-if="selectedCnt>0" class="col-sm-auto"><button type="button" class="btn btn-primary btn-info btn-sm" onclick="fileOpBtClick('cut')"><i class="fa fa-cut"></i> 剪贴</button></div>
            <div v-if="selectedCnt>0" class="col-sm-auto"><button type="button" class="btn btn-primary btn-danger btn-sm" onclick="fileOpBtClick('delete')"><i class="fa fa-trash"></i> 删除</button></div>

            <!-- <div v-if="selectedCnt==1" class="col-sm-auto"><button type="button" class="btn btn-primary btn-sm"  onclick="fileOpBtClick('rename')"><i class="fa fa-edit"></i> 重命名</button></div> -->
            <!-- /.col -->

        </div><!-- /.row -->
    </div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->

<!-- 主体内容 -->
<div class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header"> <span class="badge badge-info" onclick="loadBack()"> 上一级</span> | <a>/root/</a></div>
                    <div class="card-body p-0">
                        <table class="table table-striped projects">
                            <thead>
                            <tr>
                                <th style="width: 1%">
                                    <div class="icheck-primary d-inline">
                                        <input type="checkbox" id="checkFileAllBt" onchange="checkFileAllClick(this.checked)">
                                        <label for="checkFileAllBt"></label>
                                    </div>
                                </th>
                                <th >名称<i class="fa fa-arrow-down"></i></th>
                                <th style="width: 20%">修改日期</th>
                                <th style="width: 10%">类型</th>
                                <th style="width: 10%" class="text-center">大小</th>
                                <th style="width: 25%"></th>
                            </tr>
                            </thead>
                            <tbody id="fileManager">
                                    <tr v-for="(item,index) in fileList" :key="item.filename">
                                        <td><input type="checkbox" :name='index' class="checkFileBox" onchange="checkFileClick(this.checked)"></td>
                                        <td>
                                            <i class="fas fa-file"></i>
                                            <a href="javascript:void(0)" :name="index" ondblclick="selFileClick(this.name)"> {{item.filename}}</a>
                                            <!--                                    <br><small>创建于 01.01.2019</small>-->
                                        </td>
                                        <td>
                                            <span class="badge badge-info">{{item.lastModified}}</span>
                                        </td>
                                        <td class="project_progress">
                                            <span class="badge badge-info">{{item.isFile}}</span>
                                        </td>
                                        <td class="project-state">
                                            <span class="badge badge-warning">{{item.size}} Byte</span>
                                        </td>
                                        <td class="project-actions text-right">
                                            <a class="btn btn-primary btn-sm" :name="index" href="javascript:void(0)" onclick="fileOpBtClickById('rename',this.name)">
                                                <i class="fas fa-edit"></i> 重命名</a>
                               <!--             <a class="btn btn-primary btn-sm" href="javascript:void(0)" onclick="fileOpBtClickById('share',this.name)">
                                                <i class="fas fa-share-alt"></i> 共享</a> -->
                                            <a class="btn btn-info btn-sm" :name="index" href="javascript:void(0)" onclick="fileOpBtClickById('download',this.name)">
                                                <i class="fas fa-download"></i> 下载</a>
                                            <a class="btn btn-danger btn-sm" :name="index" href="javascript:void(0)" onclick="fileOpBtClickById('delete',this.name)">
                                                <i class="fas fa-trash"></i> 删除</a>
                                        </td>
                                    </tr>

                            </tbody>
                        </table>
                    </div>
                </div><!-- /.card -->
            </div>
            <!-- /.col-md-6 -->
        </div>
        <!-- /.row -->
    </div><!-- /.container-fluid -->
</div>

<div class="modal fade" id="fileOpDialog">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="fileOpDialogTitle">title</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <ul id="fileOpDialogFileList"></ul>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="removeFileId=-1">取消</button>
                <button type="button" class="btn btn-primary" id="fileOpDialogConfirmBt" data-dismiss="modal" onclick="">确认</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<div class="modal fade" id="inputDialog">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="inputDialogTitle">重命名</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
				
				<!-- <span id="inputDialogTip">请输入新文件名：</span>< -->
				<input type="text" id="inputDialogInput"/>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="removeFileId=-1">取消</button>
                <button type="button" class="btn btn-primary" id="inputDialogConfirmBt" data-dismiss="modal" onclick="">完成</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>

<div class="modal fade" id="sharedFileLimitDialog">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">共享权限设置</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-auto">
                        <input type="checkbox" id="sharedCheckRead" checked>
                        <label for="sharedCheckRead">匿名读</label>
                    </div>
                    <div class="col-sm-auto">
                        <input type="checkbox" id="sharedCheckWrite" checked>
                        <label for="sharedCheckWrite">匿名写</label>
                    </div>
                    <div class="col-sm-auto">
                        <input type="checkbox" id="sharedCheckSearch" checked>
                        <label for="sharedCheckSearch">可被搜索</label>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-auto">
                        <input type="checkbox" id="sharedCheckUserRead" checked>
                        <label for="sharedCheckUserRead">用户读</label>
                    </div>
                    <div class="col-sm-auto">
                        <input type="checkbox" id="sharedCheckUserWrite" checked>
                        <label for="sharedCheckUserWrite">用户写</label>
                    </div>
                    <div class="col-sm-auto">
                        <input type="checkbox" id="sharedCheckUsePw" onclick="sharedCheckPwInputBox.hidden=!this.checked">
                        <label for="sharedCheckUsePw">使用密码</label>
                    </div>
                </div>
                <div class="row" id="sharedCheckPwInputBox" hidden>
                    <div class="col-sm-auto">
                        输入密码：<input class="col-sm-4" type="text" :value="sharedFile.password" id="sharedCheckPwInput">
                    </div>
                </div>
            </div>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="sharedFileConfig()">共享</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.content -->
<script src="js/subpages/mydisk.js"></script>